package com.ywn.controller;

import com.ywn.domain.TbContent;
import com.ywn.service.TbContentService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

@RestController
public class TbContentController {

    @Autowired
    private TbContentService tbContentService;

    /**
     * 获取全部资源
     *
     * @return
     */
    @GetMapping("/jnjbnhj")
    public String selectAll() {
        return tbContentService.selectAll();
    }

    /**
     * 获取资源详情
     *
     * @param id
     * @return
     */
    @GetMapping("/redads/{id}")
    public String getById(@PathVariable Long id) {
        return tbContentService.getById(id);
    }

    /**
     * 新增资源
     *
     * @param tbContent
     * @return
     */
    @PostMapping("/insert")
    public String insert(@RequestBody TbContent tbContent) {
       return null;
    }

    /**
     * 更新资源
     *
     * @param tbContent
     * @return
     */
    @PutMapping("/update")
    public String update(@RequestBody TbContent tbContent) {
        return null;
    }

    /**
     * 删除资源
     *
     * @param id
     * @return
     */
    @DeleteMapping("/delete/{id}")
    public String delete(@PathVariable Long id) {
        return null;
    }
}
